Skip to content

fix(tui): reduce chat input flicker#10

Merged
remarkablemark merged 2 commits into
masterfrom
fix/tui
May 6, 2026
Merged

fix(tui): reduce chat input flicker#10
remarkablemark merged 2 commits into
masterfrom
fix/tui

Conversation

@remarkablemark
Copy link
Copy Markdown
Member

What is the motivation for this pull request?

This is a bug fix for intermittent screen flicker in the Ink chat input while typing and especially when holding keys like backspace.

What is the current behavior?

The chat input could visibly flicker because it remounted or rerendered excessively during typing, autocomplete, and submit/reset flows.

What is the new behavior?

The chat input now stays stable while typing. The remount-heavy autocomplete path was replaced with a simpler flow that only resets after submit, reducing redraw churn and removing the flicker source.

Checklist:

Implemented the input rewrite. The flicker source was the remount pattern
in the old autocomplete path; that’s now reduced to a submit-only reset
instead of remounting during typing/completion.

The main change is `src/components/ChatInput.tsx`, which replaces the old
`Autocomplete` component. It uses `TextInput`’s built-in `suggestions` for
slash commands, removes the custom arrow/tab menu logic, and only remounts
the input after a successful submit to clear the field.

`src/components/Chat.tsx` no longer keys the input on every submit cycle,
and `src/components/index.ts` now exports `ChatInput`.
@remarkablemark remarkablemark self-assigned this May 6, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/components/Chat.tsx 100.00% <100.00%> (ø)
src/components/ChatInput.tsx 100.00% <100.00%> (ø)
src/constants/command.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@remarkablemark remarkablemark added the bug Something isn't working label May 6, 2026
@remarkablemark remarkablemark merged commit a406a7f into master May 6, 2026
15 checks passed
@remarkablemark remarkablemark deleted the fix/tui branch May 6, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant